NotBlankString

@SinceKotoolsTypes(version = "1.2")
value class NotBlankString constructor(val value: String) : Comparable<String>

Represents strings containing at least 1 character, excluding whitespaces.

Constructors

Link copied to clipboard

Returns the value as a not blank string, or throws an IllegalArgumentException if the value is blank.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
@SinceKotoolsTypes(version = "2.0")
open infix operator override fun compareTo(other: String): Int
infix operator fun compareTo(other: NotBlankString): Int

Compares this value lexicographically with the other value for order. Returns 0 if this value equals the other value, a negative number if this value is less than the other value, or a positive number if this value is greater than the other value.

Link copied to clipboard
infix operator fun get(index: PositiveInt): Char

Returns the character of this value at the specified index, or throws an IndexOutOfBoundsException if the index is out of bounds.

Link copied to clipboard
infix fun getOrNull(index: PositiveInt): Char?

Returns the character of this value at the specified index, or returns null if the index is out of bounds.

Link copied to clipboard
infix operator fun plus(other: Any?): NotBlankString

Returns the concatenation of this value with the string representation of the other object.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val first: Char

Returns the first character of this value.

Link copied to clipboard

Returns the length of this value.

Link copied to clipboard